package cn.iocoder.yudao.hires.mapper;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.hires.entity.DictSpecializedDO;
import cn.iocoder.yudao.hires.vo.DictSpecializedPageReqVO;
import org.apache.ibatis.annotations.Mapper;

/**
 * 专业字典 Mapper
 *
 * @author 芋道源码
 */
@Mapper
public interface DictSpecializedMapper extends BaseMapperX<DictSpecializedDO> {

    default PageResult<DictSpecializedDO> selectPage(DictSpecializedPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<DictSpecializedDO>()
                .likeIfPresent(DictSpecializedDO::getName, reqVO.getName())
                .eqIfPresent(DictSpecializedDO::getCode, reqVO.getCode())
                .orderByDesc(DictSpecializedDO::getId));
    }

}